﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Group.Topic" %>
<asp:Literal ID="lRTCount" Text="15" runat="server" Visible="false"/>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left">
			</div>
			<div id="body_main">
				<div class="Center9001">
					<div class="Center9001right">
						<div class="Title">
								<h1><%=tm.Title%></h1>
							<div class="copyright"><a href="<%=WWWHost%>"><%=GetText("M0001")%></a> > <a href="<%=WWWHost%>/groups/"><%=GetText("M0012")%></a> > <a href="<%=WWWHost%>/groups/<%=tm.GID %>"><%=Lx.Web.Common.UI.Globals.GetString(tm.GroTitle,50)%></a> > <a href="<%=WWWHost%>/groups/<%=tm.GID %>/forum.htm"><%=GetText("GP004")%></a> > <%=GetText("GP045")%></div>
						</div>
						<div class="center9001content">
							<div>
								<div class="contentN">
									<div class="group_topic_avater Pic75"><a class="photo_75" href="<%=WWWHost%>/<%=tm.Memberno %>.htm" ><img src="<%=tm.Avatar==""?"/Images/No_pic.gif":tm.Avatar%>" alt="<%=HttpUtility.HtmlAttributeEncode(tm.NickName) %>"/></a></div>
									<div class="group_topic_content">
										<div class="group_topic_tltle">
											<strong><%=tm.Title %></strong><br />
											<p><%=tm.Desc%></p>
											<p class="grey12"><a href="<%=WWWHost%>/<%=tm.Memberno%>.htm"><%=tm.NickName%></a> - <%=tm.CreateDate.ToString("HH:mm, dd/MM/yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)%> - <span id="TopicsCount"><%=GetText("GP035",new string[]{tm.Topics.ToString()})%></span></p>
										</div>
										<div class="group_topic_select">
											<div class="floatl" style="height:25px"><input name="" type="button" value="<%=GetText("C0065")%>" title="<%=GetText("C0065")%>: <%=Escape(tm.Title)%>" class="button" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ClickRTBT('')\"":"onclick=\"NotAffirm()\""%>/></div>
											<div class="floatr" style="margin-left:10px">
												<script type="text/javascript">
												addthis_url = window.location.href;  
												addthis_title = ""; 
												addthis_pub = "italki.com";							
												</script>
												<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
											</div>
											<div class="floatr">
												<%=tm.TMR == "1" ? "<a href='javascript:void(0);' title='"+GetText("C0050")+"' onclick='DelTopic()'><img src='/Images/gaction_delete.gif' border='0' align='absmiddle' /></a>&nbsp;<a href='javascript:void(0);' title='"+GetText("C0050")+"' onclick='DelTopic()'>"+GetText("C0050")+"</a>" : ""%>&nbsp;&nbsp;<a href="javascript:void(0);" title="<%=GetText("C3008")%>" onclick="$ShareRes$()"><img src="/Images/icon_common_share.gif" border="0" align="absmiddle" /></a>&nbsp;&nbsp;<a href="javascript:void(0);" title="<%=GetText("C3008")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$ShareRes$()\"":"onclick=\"NotAffirm()\""%>><%=GetText("C3008")%></a>&nbsp;&nbsp;<a href="javascript:void(0);" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><img src="/Images/icon_report.gif" border="0" align="absmiddle" /></a>&nbsp;<a href="javascript:void(0);" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><%=GetText("C0110")%></a></div>
											<div class="clear"></div>
										</div>
									</div>
									<div class="Clear"></div>
								</div>
								<div class="contentN">
									<div id="TopicList">  
										<asp:Repeater ID="rptReTopic" runat="server">
										<ItemTemplate>
											<div class="topic_reply">												
												<div class="topic_reply_av">
													<div class="pic50"><a class="photo_50" href="<%#WWWHost%>/<%#Eval("Memberno") %>.htm" ><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" alt=\"" + HttpUtility.HtmlAttributeEncode(Eval("NickName").ToString()) + "\"/>" : "<img src=\"" + Eval("Avatar").ToString()+ "\" alt=\"" + HttpUtility.HtmlAttributeEncode(Eval("NickName").ToString()) + "\"/>"%></a></div>
												</div>
												<div class="topic_reply_info">
													<%#Eval("ParentContent")%>
													<div><%#Eval("Topic")%></div>
													<div class="margin5 grey12">
														<div class="floatl" style="width:50%"><a href="<%#WWWHost%>/<%#Eval("Memberno") %>.htm"><%#Eval("NickName") %></a> <%#FormatDiffDate(GetText("C0036"), Eval("DiffDate").ToString())%></div>
														<div class="floatr"><%#tm.TMR == "1" ? "<a href='javascript:void(0);' title='"+GetText("C0050")+"' onclick='DelReplyTopic(\"" + Eval("TopicID").ToString() + "\")'><img src='/Images/gaction_delete.gif' align='absmiddle' border='0'></a>&nbsp;<a href='javascript:void(0);' title='"+GetText("C0050")+"' onclick='DelReplyTopic(\"" + Eval("TopicID").ToString() + "\")'>"+GetText("C0050")+"</a>" : ""%>&nbsp;&nbsp;<a href="javascript:void(0);" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ClickRTBT('"+Eval("TopicID")+"')\"":"onclick=\"NotAffirm()\""%> title="<%=GetText("C0065")%>" ><img src="/Images/icon_common_comment.gif"  border="0" align="absmiddle" /></a>&nbsp;<a href="javascript:void(0);" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ClickRTBT('"+Eval("TopicID")+"')\"":"onclick=\"NotAffirm()\""%> title="<%=GetText("C0065")%>"><%=GetText("C0065")%></a>&nbsp;&nbsp;<a href="javascript:void(0);" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><img src="/Images/icon_report.gif"  border="0" align="absmiddle" /></a>&nbsp;<a href="javascript:void(0);"  onClick="$Feedback$()"><%=GetText("C0110")%></a></div>
														<div class="clear"></div>
													</div>
												</div>
												<div class="clear"></div>
											</div>
										</ItemTemplate>
										</asp:Repeater>
									</div>
									<div id="divPage">
										<%=CreatePageNav(tm.Topics, int.Parse(lRTCount.Text), PageIndex,"",
											string.Format("<span class='page_none grey10'><a href='{0}/groups/{1}/topic/{2}-$I$.htm'>{3}</a></span>&nbsp;", WWWHost,tm.GID,tid,HttpUtility.UrlEncode(GetText("Prev"))),
											"",
											string.Format("<span class='page_none grey10'><a href='{0}/groups/{1}/topic/{2}-$I$.htm'>{3}</a></span>&nbsp;", WWWHost,tm.GID,tid,HttpUtility.UrlEncode(GetText("Next"))),
											string.Format("<span class='page_select'>{0}</span>&nbsp;", PageIndex),
											string.Format("<span class='page_none grey10'><a href='{0}/groups/{1}/topic/{2}-$I$.htm'>$I$</a></span>&nbsp;",WWWHost,tm.GID,tid)
										)%>									
									</div>
								</div>
								<div>
								    <span class="black16b"> <%=GetText("C0065")%> “ <%=tm.Title %> ”</span>
								</div>
								<div id="ReTopicDIV">
									<input type="hidden" id="txtDesc1" name="txtDesc1" value="" />
									<input type="hidden" id="txtDesc1___Config" value="ImageBrowserURL=editor/filemanager/browser/default/browser.html?Type%3DImage%26Connector%3Dconnectors/aspx/connector.aspx" />
									<iframe id="txtDesc1___Frame" src="/FCKeditor/editor/fckeditor.html?InstanceName=txtDesc1&amp;Toolbar=italkiSimple" width="100%" height="200px" frameborder="no" scrolling="no"></iframe>
									<div id="ErrorDesc" style="display:none" class="red10"><%=GetText("ST155",new string[]{"3","1000"})%></div>
									<div><input id="btnSave" type="button" class="button" value="<%=GetText("C0065")%>"  <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ReplyTopic()\"":"onclick=\"NotAffirm()\""%>/></div>
								</div>
							</div>
						</div>
					</div>
					<div class="Center9001left">
						<div class="right_layerA margin20T">
							<input id="txtSear" type="text" class="common160"  onkeydown="$Enter$(event,'bttSear')"/><a href="#" id="bttSear" name="bttSear_name" class="buttonimg" onclick="javascript:location.href='<%=WWWHost%>/groups/Search/'+$get('txtSear').value.replace(/\?/gi, '').replace(/\//gi, '').replace(/-/gi, '').replace(/&/gi, '')+'.htm';" title="<%=GetText("C0066")%>" ><img src="/Images/btn_search.gif" border="0" class="img" /></a><br /><a href="<%=WWWHost%>/groups/AdvancedSearch.htm" ><%=GetText("C0067")%></a>
						</div>
						<div class="right_layerA">
							<%if (rptTopic.Items.Count > 0) {%>  
							<div class="layer_contentA">								 
								<h4><%=GetText("GP021")%></h4>
								<div class="layer_contentA5">
									<asp:Repeater ID="rptTopic" runat="server"><ItemTemplate>
										<div class="common_right_pic_list">
											<div class="common_right_pic_listPIC"><div class="picsp"><a class="photo_sp" href="<%#WWWHost%>/<%#Eval("Memberno") %>.htm" title="<%#Eval("NickName") %>"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" alt=\"" + HttpUtility.HtmlAttributeEncode(Eval("NickName").ToString()) + "\"/>" : "<img src=\"" + Eval("Avatar").ToString()+ "\"	alt=\"" + HttpUtility.HtmlAttributeEncode(Eval("NickName").ToString()) + "\"/>"%></a></div></div>
											<div class="common_right_pic_listCON"><a href="<%#WWWHost%>/groups/<%#tm.GID %>/topic/<%#Eval("FID") %>.htm"><%#Eval("Title")%></a>&nbsp;<span class="grey12" dir="ltr">(<%#Eval("Topics")%>)</span></div>
											<div class="clear"></div>
										</div>
									</ItemTemplate></asp:Repeater>
								</div>
								<div class="margin5" style="text-align:right"><a href="<%=WWWHost %>/groups/<%=tm.GID %>/forum.htm"><%=GetText("GP216")%></a></div>								
							</div>
							<%} %>
						</div>
					</div>							 
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>	
</div>

<div id="RTopicItem" style="display:none" class="margin20">
	<div class="topic_reply">												
		<div class="topic_reply_av">
			<div class="pic50"><a class="photo_50" href="<%=WWWHost%>/$Memberno$.htm" title="$NickName$">$Avatar$</a></div>
		</div>
		<div class="topic_reply_info">
			$ParentContent$
			<div>$Topic$</div>
			<div class="margin5 grey12">
				<div class="floatl"><a href="<%=WWWHost%>/$Memberno$.htm">$NickName$</a> $DiffDate$</div>
				<div class="floatr">$Delete$&nbsp;&nbsp;<a title="<%=GetText("C0065")%>" href="javascript:void(0);" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ClickRTBT('$TopicID$')\"":"onclick=\"NotAffirm()\""%>><img src="/Images/icon_common_comment.gif" border="0" align="absmiddle" /></a>&nbsp;<a href="javascript:void(0);" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"ClickRTBT('$TopicID$')\"":"onclick=\"NotAffirm()\""%>><%=GetText("C0065")%></a>&nbsp;&nbsp;<a href="#" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><img src="/Images/icon_report.gif" border="0" align="absmiddle" /></a>&nbsp;<a href="#" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><%=GetText("C0110")%></a></div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="clear"></div>
	</div>	
</div>
<script>
<!--
var pIndex = <%=PageIndex %>;
var delTitle="<%=GetText("C0050")%>";
var Delete = "<%=GetText("C0050")%>";
var delBody="<%=GetText("GP119")%>";
var delRpBody="<%=GetText("GP120")%>";
var WWWHost = "<%=WWWHost %>";
var GroupID = "<%=tm.GID %>";
var TopicID = "<%=tid %>"
var TMR = "<%=tm.TMR %>"
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0036")%>";
var strHome = "";
var strPre = "<span class='page_none grey10'><a href='/groups/<%=tm.GID %>/topic/<%=tid %>-$I$.htm'><%=HttpUtility.UrlEncode(GetText("Prev"))%></a></span>&nbsp;";
var strLast = "";
var strNext = "<span class='page_none grey10'><a href='/groups/<%=tm.GID %>/topic/<%=tid %>-$I$.htm'><%=HttpUtility.UrlEncode(GetText("Next"))%></a></span>&nbsp;";
var strSel = "<span class='page_select'>$I$</span>&nbsp;";
var strUnSel = "<span class='page_none grey10'><a href='/groups/<%=tm.GID %>/topic/<%=tid %>-$I$.htm'>$I$</a></span>&nbsp;";
var C0069 = '<%=GetText("C0069")%>';
var gCancel = "<%=GetText("C0056")%>";
//-->
</script>